import request from '@/utils/request'

// 获取当前任务列表
export const getcurrenttodoList = params => {
    return request({
        url: '/api/currenttodoList',
        method: 'get',
        params,
    })
}

// 获取未完成任务列表
export const getunfinishtodoList = params => {
    return request({
        url: '/api/unfinishtodoList',
        method: 'get',
        params,
    })
}

// 获取已完成任务列表
export const getfinishedtodoList = params => {
    return request({
        url: '/api/finishedtodoList',
        method: 'get',
        params,
    })
}

// 新增任务
export const addtodo = params => {
    return request({
        url: '/api/todo',
        method: 'post',
        params,
    })
}

// 删除某个任务
export const Deletetodo = Id => {
    return request({
        url: `/api/todo/${Id}`,
        method: 'delete',
    })
}
